using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 票种价格
    /// </summary>
    public class TicketPrice : ByBranchEntity<Guid>
    {
        /// <summary>
        /// 排班标识
        /// </summary>
        //public Guid ScheduleId { get; set; }
        //[ForeignKey("ScheduleId")]
        //public virtual Schedule Schedule { get; set; }
        /// <summary>
        /// 票型标识
        /// </summary>
        public Guid TicketId { get; set; }
        [ForeignKey("TicketId")]
        public virtual Ticket Ticket { get; set; }
        /// <summary>
        /// 价格
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 折扣
        /// </summary>
        [Required,DefaultValue(1)]
        public decimal Discount { get; set; }
        /// <summary>
        /// 退款折扣
        /// </summary>
        [Required,DefaultValue(typeof(decimal), "1")]
        public decimal RDiscount { get; set; }
        /// <summary>
        /// 上架时间
        /// </summary>
        public DateTime UpperTime { get; set; }
        /// <summary>
        /// 下架时间
        /// </summary>
        public DateTime LowerTime { get; set; }
        /// <summary>
        /// 显示位置
        /// </summary>
        public PositionEnum Position { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        public long? Sort { get; set; }
        /// <summary>
        /// 价格名称
        /// </summary>
        public string TicketName { get; set; }
        /// <summary>
        /// 仓位
        /// </summary>
        public WareHousePosition WarePosition { get; set; }
    }
}
